/*
 * @Author: shuai
 * @Date: 2021-04-02 10:34:59
 * @LastEditors: shuai
 * @LastEditTime: 2021-04-04 10:16:40
 * @Description: file content
 */
/* eslint-disable @typescript-eslint/no-var-requires */
const Mock = require('mockjs')

const data = Mock.mock({
  'items|30': [
    {
      id: '@id',
      title: '@sentence(10, 20)',
      'status|1': ['published', 'draft', 'deleted'],
      author: 'name',
      display_time: '@datetime',
      pageviews: '@integer(300, 5000)',
    },
  ],
})

module.exports = [
  {
    url: '/vue-admin-template/table/list',
    type: 'get',
    response: (config) => {
      const items = data.items
      return {
        code: 20000,
        data: {
          total: items.length,
          items: items,
        },
      }
    },
  },
]
